package com.xingkeduo.util.pojo.enums;

import com.xingkeduo.util.pojo.base.BaseEnum;

/**
 * 民族枚举
 * 
 * @author GJ
 * @time 2018年12月29日 下午4:42:18
 * @description
 */
public enum EthnicEnum implements BaseEnum {
	ACHANG(1 ,"阿昌族"),
	PAI(2 ,"白族Bai"),
	BONAN(3 ,"保安族"),	 
	BLANG(4 ,"布朗族"),
	BOUYEI(5 ,"布依族"),
	KOREAN(6 ,"朝鲜族"),
	DAUR(7 ,"达斡尔族"),
	DAI(8 ,"傣族Tai"),
	DEANG(9 ,"德昂族"),
	DONGXIANG(10,"东乡族"),
	TUNG(11,"侗族Dong"),
	DRUNG(12,"独龙族"),
	OROGEN(13,"鄂伦春族"),
	ELUOSI(14,"俄罗斯族"),
	EWENKI(15,"鄂温克族"),
	GAOSHAN(16,"高山族"),
	GELO(17,"仡佬族"),
	HAN(18,"汉族"),
	HANI(19,"哈尼族"),
	KAZAK(20,"哈萨克族"),
	HEZHE(21,"赫哲族"),
	HUI(22,"回族"),
	JINO(23,"基诺族"),
	JINGPO(24,"景颇族"),
	JING(25,"京族"),
	KIRGIZ(26,"柯尔克孜族"),
	LAHU(27,"拉祜族"),
	LHOBA(28,"珞巴族"),
	LISU(29,"傈僳族"),
	LI(30,"黎族"),
	MAN(31,"满族"),
	MAONAN(32,"毛南族"),
	MOINBA(33,"门巴族"),
	MONGGOL(34,"蒙古族"),
	MIAO(35,"苗族"),
	MULAM(36,"仫佬族"),
	NAXI(37,"纳西族"),
	NU(38,"怒族"),
	PUMI(39,"普米族"),
	QIANG(40,"羌族"),
	SALAR(41,"撒拉族"),
	SHE(42,"畲族"),
	SHUI(43,"水族"),
	TAJIK(44,"塔吉克族"),
	TATAR(45,"塔塔尔族"),
	TUJIA(46,"土家族"),
	TU(47,"土族"),
	WA(48,"佤族Va"),
	UYGUR(49,"维吾尔族"),
	OZBEK(50,"乌孜别克族"),
	XIBE(51,"锡伯族"),
	YAO(52,"瑶族"),
	YI(53,"彝族"),
	YUGUR(54,"裕固族"),
	TIBETAN(55,"藏族Zang"),
	ZHUANG(56,"壮族");

	private int value;
	private String desc;

	private EthnicEnum(int value, String desc) {
		this.value = value;
		this.desc = desc;
	}

	public static boolean validValue(String value) {
		int value_int = Integer.parseInt(value);
		return validValue(value_int);
	}

	public static boolean validValue(int value) {
		EthnicEnum[] ethnics = EthnicEnum.values();
		for (int i = 0; i < ethnics.length; i++) {
			if (ethnics[i].getValue() == value)
				return true;
		}
		return false;
	}

	public static EthnicEnum getEthnic(String value) {
		int value_int = Integer.parseInt(value);
		return getEthnic(value_int);
	}

	public static EthnicEnum getEthnic(int value) {
		EthnicEnum[] ethnics = EthnicEnum.values();
		for (int i = 0; i < ethnics.length; i++) {
			if (ethnics[i].getValue() == value)
				return ethnics[i];
		}
		return null;
	}

	@Override
	public int getValue() {
		return this.value;
	}

	public String getDesc() {
		return desc;
	}
}
